package com.qf.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qf.annotation.RequiresPermissionsDesc;
import com.qf.pojo.DtsAdmin;
import com.qf.util.ResponseUtil;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @author lixu
 */
@RestController
@RequestMapping("/admin/user")
@CrossOrigin
public class UserController {


    /**
     * - GET请求
     */
    @RequiresPermissionsDesc(menu = {"用户管理","会员管理"},button = "查询")
    @RequiresPermissions(value = "admin:user:list")
    @GetMapping("/list")
    public Object list(Integer page,Integer limit,String sort,String order,String username){
        return ResponseUtil.ok();
    }
    /**
     * - 接口地址 : http://localhost:8083/admin/user/approveAgency
     * - 下行数据 :
     */
    @RequiresPermissionsDesc(menu = {"用户管理","会员管理"},button = "会员审批")
    @RequiresPermissions(value = "admin:user:approveAgency")
    @GetMapping("/approveAgency")
    public Object approveAgency(){
        return ResponseUtil.ok();
    }
    /**
     * 会员推广代理
     * - 接口地址 : http://localhost:8083/admin/user/detailApprove?id=71
     *
     * - 下行数据 :
     */
    @RequiresPermissionsDesc(menu = {"用户管理","会员管理"},button = "会员推广代理")
    @RequiresPermissions(value = "admin:user:detailApprove")
    @GetMapping("/detailApprove")
    public Object detailApprove(Integer id){
        return ResponseUtil.ok();
    }
}
